# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: lucck <lucck@ep.com.pl>
# Contributor: aksr <aksr at t-com dot me>

pkgname=udftools
pkgver=2.3
pkgrel=1
pkgdesc='Linux tools for UDF filesystems and DVD/CD-R(W) drives'
url='https://github.com/pali/udftools'
arch=('loong64' 'x86_64')
license=('GPL')
depends=('ncurses' 'readline')
makedepends=('systemd')
source=("https://github.com/pali/$pkgname/releases/download/$pkgver/$pkgname-${pkgver}.tar.gz")
sha256sums=('750dcf5c797765eb42265e0a56d1a99f97f94b7f6f4534263a5410503f0caf59')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  sed -i 's|/lib/|$(libdir)/|' pktsetup/Makefile.am
  autoreconf -fi
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --sbindir=/usr/bin
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

